using B.S.XZYData.Domain.XZY;
using B.S.XZYData.ErrorCode;
using MediatR;

namespace B.S.XZYData.Api.Wrter.Application.Command.Team
{
    /// <summary>
    /// 批量添加班组命令
    /// </summary>
    public class BatchAddTeamsCommand : IRequest<ApiResult<BatchAddTeamsResult>>
    {
        /// <summary>
        /// 班组列表
        /// </summary>
        public List<TeamImportModel> Teams { get; set; } = new List<TeamImportModel>();
    }

    /// <summary>
    /// 班组导入模型
    /// </summary>
    public class TeamImportModel
    {
        /// <summary>
        /// 班组名称
        /// </summary>
        public string TeamName { get; set; } = string.Empty;

        /// <summary>
        /// 编组编码
        /// </summary>
        public string TeamCode { get; set; } = string.Empty;

        /// <summary>
        /// 班组类型
        /// </summary>
        public string TeamType { get; set; } = string.Empty;

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }
    }

    /// <summary>
    /// 批量添加班组结果
    /// </summary>
    public class BatchAddTeamsResult
    {
        /// <summary>
        /// 总数量
        /// </summary>
        public int TotalCount { get; set; }

        /// <summary>
        /// 成功数量
        /// </summary>
        public int SuccessCount { get; set; }

        /// <summary>
        /// 失败数量
        /// </summary>
        public int FailCount { get; set; }

        /// <summary>
        /// 错误信息列表
        /// </summary>
        public List<string> Errors { get; set; } = new List<string>();
    }
}
